{extend name="public:base" /}

{block name="css"}
<link rel="stylesheet" type="text/css" href="/static/layui/css/layui.css"/>
<link href="__ADMIN__/css/style.css" rel="stylesheet">{block name="content"}
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox ">
                <div class="ibox-content">
                    <div class="box-item">
                        <div class="form-group row"><label class="col-sm-1 col-form-label">订单信息</label>
                            <div class="col-sm-3">
                                <input type="text" class="form-control" value="订单号：{$info.order_sn}" readonly>
                            </div>

                            <div class="col-sm-3">
                                <input type="text" class="form-control" value="支付金额：{$info.pay_price}" readonly>
                            </div>
                        </div>
                    </div>

                    <div class="box-item">
                        <div class="form-group row">
                            <label class="col-sm-1 col-form-label"></label>
                            <div class="col-sm-3">
                                <select class="form-control" disabled>
                                    <option value="1" {$info[
                                    'status'] == 1 ? 'selected' : ''}>订单状态：待付款</option>
                                    <option value="2" {$info[
                                    'status'] == 2 ? 'selected' : ''}>订单状态：待发货</option>
                                    <option value="3" {$info[
                                    'status'] == 3 ? 'selected' : ''}>订单状态：已发货</option>
                                    <option value="4" {$info[
                                    'status'] == 4 ? 'selected' : ''}>订单状态：已完成</option>
                                    <option value="5" {$info[
                                    'status'] == 5 ? 'selected' : ''}>订单状态：售后中</option>
                                    <option value="7" {$info[
                                    'status'] == 6 ? 'selected' : ''}>订单状态：已同意售后</option>
                                    <option value="8" {$info[
                                    'status'] == 7 ? 'selected' : ''}>订单状态：已拒绝售后</option>
                                </select>
                            </div>
                            <div class="col-sm-3">
                                <select class="form-control" disabled>
                                    <option value="0" {$info[
                                    'is_pay'] == 0 && $info['is_pay'] !='' ? 'selected' : ''}>支付状态：未支付</option>
                                    <option value="1" {$info[
                                    'is_pay'] == 1 ? 'selected' : ''}>支付状态：已支付</option>
                                </select>
                            </div>
                        </div>
                    </div>

                    <div class="box-item">
                        <div class="form-group row"><label class="col-sm-1 col-form-label"></label>
                            <div class="col-sm-3">
                                <input type="text" class="form-control" value="支付时间：{$info.pay_time?timeFormat($info.pay_time):'未支付'}" readonly>
                            </div>

                            <div class="col-sm-3">
                                <input type="text" class="form-control" value="收货时间：{$info.complete_time?timeFormat($info.complete_time):'未收货'}" readonly>
                            </div>
                        </div>
                    </div>

                    <div class="box-item">
                        <div class="form-group row"><label class="col-sm-1 col-form-label"></label>
                            <div class="col-sm-3">
                                <input type="text" class="form-control" value="支付时间：{$info.pay_time|timeFormat}" readonly>
                            </div>
                        </div>
                    </div>

                    <div class="box-item">
                        <div class="form-group row"><label class="col-sm-1 col-form-label">备注信息</label>
                            <div class="col-sm-3">
                                <div style="margin-top:8px; padding: 6px 12px; background: #e9ecef; min-height: 100px">{$info.remark}</div>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
            {if $info.type == 1}
            <div class="ibox">
                <div class="ibox-content">
                    <div class="box-item">
                        <div class="form-group row"><label class="col-sm-1 col-form-label">外送信息</label>
                            <div class="col-sm-3">
                                <input type="text" class="form-control" value="收货人姓名：{$info.get_username}" readonly>
                            </div>

                            <div class="col-sm-3">
                                <input type="text" class="form-control" value="收货人手机号：{$info.get_mobile}" readonly>
                            </div>
                        </div>
                    </div>

                    <div class="box-item">
                        <div class="form-group row"><label class="col-sm-1 col-form-label"></label>
                            <div class="col-sm-6">
                                <input type="text" class="form-control" value="收货人地址：{$info.get_address}" readonly>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                    </div>
                </div>
            </div>
            {else /}
            <div class="ibox">
                <div class="ibox-content">
                    <div class="box-item">
                        <div class="form-group row"><label class="col-sm-1 col-form-label">自提信息</label>
                            <div class="col-sm-3">
                                <input type="text" class="form-control" value="时间：{$info.zt_time}" readonly>
                            </div>

                            <div class="col-sm-3">
                                <input type="text" class="form-control" value="联系方式：{$info.zt_mobile}" readonly>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            {/if}

            <div class="ibox ">
                <div class="ibox-content ">
                    <div class="table-responsive">
                        <table class="table table-striped">
                            <thead>
                            <tr>
                                <th>商品名称</th>
                                <th>商品图片</th>
                                <th>商品数量</th>
                                <th>单价</th>
                            </tr>
                            </thead>
                            <tbody>
                            {volist name="order_vice" id="vo"}
                            <tr>
                                <td>{$vo.name}</td>
                                <td><img class="upload-file" src="{:getPicture($vo.img)}"></td>
                                <td>{$vo.count}</td>
                                <td>{$vo.price}</td>
                            </tr>
                            {/volist}
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>

            <!-- 售后 订单-->
            {if condition="$info.status egt 5"}
            <div class="ibox ">
                <div class="ibox-content ">
                    <form method="post">
                        <div class="ibox-content">
                            <div class="box-item">
                                <div class="form-group row">
                                    <label class="col-sm-1 col-form-label">售后理由</label>
                                    <div class="col-sm-3">
                                        <textarea class="form-control" readonly rows="8">{$info.after_reason}</textarea>
                                        <span class="form-text m-b-none"></span>
                                    </div>
                                </div>
                                <div class="hr-line-dashed"></div>
                            </div>

                            <div class="box-item">
                                <div class="form-group row">
                                    <label class="col-sm-1 col-form-label">售后图片</label>
                                    <div class="col-sm-6">
                                        <div class="form-uploaded-box" id="form-uploaded-box">
                                            {volist name="after_imgs" id="vo"}
                                            <div class="form-uploaded-img-box">
                                                <img class="form-uploaded-box-img" src="{$vo.path}" data-id="{$vo.id}">
                                                <i class="form-uploaded-img-preview iconfont icon-yulan" onclick="previewImg(this, 'form-uploaded-img-preview')"></i>
                                            </div>
                                            {/volist}
                                        </div>

                                    </div>
                                </div>
                                <div class="hr-line-dashed"></div>
                            </div>

                            <div class="box-item">
                                <div class="form-group row"><label class="col-sm-1 col-form-label">售后操作</label>
                                    <div class="col-sm-3">
                                        <select class="form-control changeStatus" name="status" {if condition="$info.status gt 5" }disabled{/if}>
                                        <option value="0">请选择</option>
                                        <option value="6" {$info[
                                        'status'] == 6 ? 'selected' : ''}>同意售后请求</option>
                                        <option value="7" {$info[
                                        'status'] == 7 ? 'selected' : ''}>拒绝售后请求</option>
                                        </select>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <input type="hidden" name="id" value="{$info.id}"/>

                        {if $info.status == 5}
                        <div class="form-group row">
                            <div class="col-sm-4 col-sm-offset-2">
                                <button type="button" class="btn btn-w-m btn-primary ajax-post">
                                    确认审核
                                </button>
                            </div>
                        </div>
                        {/if}
                    </form>
                </div>
            </div>
            {/if}
            <button type="button" class="btn btn-w-m btn-default back-page">返回</button>
        </div>
    </div>
</div>
{include file="public/preview-img-mask" swiper-id="cropper-preview" /}
{/block}